package io.keen.client.java;

public class KeenProject {
    private final String projectId;
    private final String readKey;
    private final String writeKey;

    public KeenProject() {
        this(new Environment());
    }

    KeenProject(Environment env) {
        this(env.getKeenProjectId(), env.getKeenWriteKey(), env.getKeenReadKey());
    }

    public KeenProject(String projectId, String writeKey, String readKey) {
        if (projectId == null || projectId.length() == 0) {
            throw new IllegalArgumentException("Invalid project id specified: " + projectId);
        }
        this.projectId = projectId;
        this.writeKey = writeKey;
        this.readKey = readKey;
    }

    public String getProjectId() {
        return this.projectId;
    }

    public String getWriteKey() {
        return this.writeKey;
    }
}
